//
//  ViewControllerExtension.swift
//  BeautyGallery
//
//  Created by lewis on 15/12/21.
//  Copyright © 2015年 lewis. All rights reserved.
//

import UIKit
extension ViewController : UIPickerViewDataSource{
    
    // returns the number of 'columns' to display.
    func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int{
        return 1;
    }
    
    // returns the # of rows in each component..
    func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int{
        return beauties.count;
    }

}

extension ViewController: UIPickerViewDelegate{
    func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String?{
        return beauties[row]
    }
    
}
